-- GENERATED SPELL FOR [Syndicate Enforcer] --


function spell0_2247(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15576,pUnit)
pUnit:RegisterEvent('Sorts_2247', 634, 1)
end

function spell1_2247(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(17207,pUnit)
pUnit:RegisterEvent('Sorts_2247', 2000, 1)
end

function Sorts_2247(pUnit, Event)
local choix_sorts_2247 = math.random(0, 1)
if choix_sorts_2247 == 0 then
pUnit:RegisterEvent('spell0_2247', 1, 1)
end
if choix_sorts_2247 == 1 then
pUnit:RegisterEvent('spell1_2247', 1, 1)
end
end

function mob2247_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2247', math.random(1500, 3000), 1)
end

function mob2247_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2247_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2247_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2247, 1, 'mob2247_Action')
RegisterUnitEvent(2247, 2, 'mob2247_Leave')
RegisterUnitEvent(2247, 3, 'mob2247_Kill')
RegisterUnitEvent(2247, 4, 'mob2247_Die')
